<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta name="decorator" content="default" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
	<%@include file="/common/head.jsp"%>
	<title>桌面</title>
</head>
<body>
    <link rel="stylesheet" type="text/css" href="${ctxPath }/web/theme/desktop/css/desktop.css" />
    <script type="text/javascript">
		Ext.Loader.setPath({
			'Ext.ux.desktop' : '${ctxPath }/web/theme/desktop/js',
			MyDesktop : '${ctxPath }/web/theme/desktop'
		});
		Ext.require('MyDesktop.App');
		var myDesktopApp;
		Ext.onReady(function() {
			myDesktopApp = new MyDesktop.App();
			var current = JSON.parse('${sessionScope.LOGIN_USER}');
			Utils.setCurrentUser(current);
		});
	</script>
    <a href="javascript:void(0);" target="_blank" alt="BKFM-FrameWork"
       id="poweredby"><div></div></a>
<script type="text/javascript">
var win = null;
Ext.onReady(function(){
	win = Ext.create('Ext.com.bkfm.window', {
		id: "msgTips",
		title: "消息提示",
		autoScroll : true,
		modal : false,
		closeAction: "hide",
		width: Utils.getWidth()*0.2,
		height: Utils.getHeight()*0.2,
		x: Utils.getWidth()-Utils.getWidth()*0.2,
		y: Utils.getHeight()-(Utils.getHeight()*0.2)-40,
		html: '<div style="width:100%;height:100%;padding:10px;" id="tips"></div>'
	});
	showNotice();
	window.setInterval(function(){ 
		showNotice();
	}, 1000*60*5); //5分钟提示一次
});
function showNotice(){
	BkfmDBUtils.Query("SELECT COUNT(0) AS NUM FROM V_BKFM_CAR_REPAIRNOTICE",function(result){
		if(result.status == "OK"){
			win.show(win,function(){
				//alert(0);
				document.getElementById("tips").innerHTML = "存在【<font color='red'>"+result.list[0].NUM+"</font>】辆车辆，即将到维修时间，请到“下次维修通知”菜单中查看";
			});
		}
	});
}
</script>
</body>
</html>